from wfs.models import *
from rest_framework import serializers

class UserSerializer(serializers.ModelSerializer):

    class Meta:
            model = User
            fields = ('username', 'last_name')


class RoleSerializer(serializers.ModelSerializer):
    user2 = serializers.StringRelatedField(many=True)

    class Meta:
            model = WorkflowRole
            fields = ('id','role', 'desc', 'type', 'user2')


class RoleOrgSerializer(serializers.ModelSerializer):


    class Meta:
            model = WFSOrgRole
            fields = ('user', 'role')


class AgentSerializer(serializers.ModelSerializer):
    class Meta:
            model = WorkflowAgent
            fields = '__all__'#('id','user_id','workflow_role')


